package com.telit.dispose.service.dispose;

import com.telit.dispose.dto.*;
import com.telit.dispose.entity.dispose.PlatMetaFieldEntity;
import com.telit.dispose.entity.dispose.PlatMetaTableEntity;
import com.telit.dispose.vo.dispose.PlatTableAndFileVO;
import com.telit.dispose.vo.dispose.PlatTableVO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;


/**
 * 元数据-表业务逻辑接口
 * Create by Chencf 2022/08/05
 */
public interface PlatMetaTableService {


    boolean createTablePlatMetaTable(PlatMetaTableEntityDTO dto);

    Object selectAllTableAndFiles(TableFindDTO tableFindDTO);

    List<PlatMetaFieldEntity> selectTableAndFilesByTableId(String tableId);

    PlatMetaTableEntityDTO selectTableByTableId(String tableId);

    void deleteTable(String tableId);

    boolean updateOrDeleteTableFile(Integer flag, PlatMetaTableEntity entity);

    boolean updateIconShow(PlatMetaTableUpdateDTO dto);


    List<PlatMetaTableEntity> findTypeList();

    PlatTableAndFileVO findInfo(String json);


    Object pageList(String tableId, Integer current, Integer size, String name, String xzqhcode);

    Integer save(String tableId, String data);

    Integer edit(String tableId, String detailId, String data);

    Map detail(String tableId, String deatilId);

    Integer delete(String tableId, String detailId);

    List<PlatTableVO> selectAllTable(String flag);

    List<Map> selectTableInfoByTableName(String tables, String districtCode) throws Exception;
    List<Map> selectTableInfoByTableName1(String longitude, String latitude,String tables, String districtCode,Integer page,Integer rows,String radius) throws Exception;

    void commExportResource(String tableId, String tableName, String resourceName, HttpServletRequest request,
                            HttpServletResponse response,
                            String xzqhcode, String name);

    void commImportTemplate(String tableId, String tableName, String resourceName, HttpServletRequest request,
                            HttpServletResponse response);

    void commLeadData(String tableId, String tableName, MultipartFile file);


    void updateResourceShow(UpdateResourceShowDTO updateResourceShow);
    void updateResourceCategory(UpdateResourceCategoryDTO updateResourceCategoryDTO);
    void addResourceCategory(AddResourceCategoryDTO addResourceCategoryDTO);

}